import QtQuick
import QtQuick.Controls

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")

    BusyIndicator {
        anchors.centerIn: parent
        running: true  // 确保 BusyIndicator 是运行的
        width: 100
        height: 100

        contentItem: Item {
            Rectangle {
                id: circle
                width: 100
                height: 100
                radius: width / 2
                gradient: Gradient {
                    GradientStop { position: 0.0; color: "red" }
                    GradientStop { position: 1.0; color: "blue" }
                }
                RotationAnimator {
                    target: circle
                    from: 0
                    to: 360
                    duration: 1000
                    loops: Animation.Infinite
                }
                ScaleAnimator {
                    target: circle
                    from: 1
                    to: 0.5
                    duration: 500
                    loops: Animation.Infinite
                    easing.type: Easing.InOutQuad
                }
            }
        }

    }
}
